import java.awt.Dimension;
import java.awt.GridLayout;

import javax.swing.JButton;
import javax.swing.JPanel;


public class Tastatur extends JPanel
{
	private JButton[] button;
	Tastatur()
	{
		this.setLayout(new GridLayout(3,3));
		this.button = new JButton[9];
		
		for(int i = (button.length-3); i < button.length; i++)
		{
			this.button[i] = new JButton(""+(i+1));
			this.button[i].setPreferredSize(new Dimension(50,50));
			this.add(button[i]);
		}
		for(int i = (button.length-6); i <= (button.length-4); i++)
		{
			this.button[i] = new JButton(""+(i+1));
			this.button[i].setPreferredSize(new Dimension(50,50));
			this.add(button[i]);
		}
		for(int i = (button.length-9); i <= (button.length-7); i++)
		{
			this.button[i] = new JButton(""+(i+1));
			this.button[i].setPreferredSize(new Dimension(50,50));
			this.add(button[i]);
		}
		
		this.setVisible(true);
	}
}
